package com.leet.code.simple_array;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * @description:    1460.通过翻转子数组使两个数组相等
 * @author: WYG
 * @time: 2021/1/4 17:14
 */

public class CanBeEqual {

    public boolean canBeEqual(int[] target, int[] arr) {
        Arrays.sort(target);
        Arrays.sort(arr);
        for (int i = 0; i < target.length; i++) {
            if (target[i] != arr[i]) {
                return false;
            }
        }
        return true;
    }

}
